home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Port Scanners / HackSpy.exe / hs.tx_ / hs.tx
Encoding:
Text File  |  2000-03-26  |  2.7 KB  |  98 lines

  1. 'HackSpy v1.0 by Kristopher Dawsey, kt0pher@aol.com
  2. 'You will need a text field named txtNum on the main form as well as a button
  3. 'called btnUpdate...these are used to update the file which stores the phone
  4. 'number to dial when the Page function is called.  You also need to place 2 ActiveX 
  5. 'controls on the form, an MSComm control named MSComm1 and an MSWinSck control 
  6. 'named Winsock1.  Have fun...
  7.  
  8. Private Sub btnUpdate_Click()
  9. Dim intFreeFile As Integer
  10. Dim strNum As String
  11. intFreeFile = FileSystem.FreeFile
  12. strNum = txtNum.Text
  13. Open ("hs.inf") For Output As intFreeFile
  14. Write #intFreeFile, strNum
  15. FileSystem.Reset
  16. Exit Sub
  17. End Sub
  18. Private Sub Form_Load()
  19. Dim intFreeFile As Integer
  20. Dim strInput As String
  21. intFreeFile = FileSystem.FreeFile
  22. On Error GoTo hnd
  23. FileSystem.ChDir ("\hs")
  24. Winsock1.LocalPort = 21
  25. Winsock1.Listen
  26. Open ("hs.inf") For Input As #intFreeFile
  27. Input #intFreeFile, strInput
  28. FileSystem.Reset
  29. txtNum.Text = strInput
  30. Exit Sub
  31. hnd:
  32. If Err.Number = 76 Then
  33.     FileSystem.MkDir ("\hs")
  34. Else
  35.     Exit Sub
  36. End If
  37. End Sub
  38. Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
  39. Dim strTime As String
  40. Dim strDate As String
  41. Dim strName As String
  42. Dim strIP As String
  43. Dim intFreeFile As Integer
  44. Page
  45. strName = Winsock1.RemoteHost
  46. strIP = Winsock1.RemoteHostIP
  47. strTime = Time
  48. strDate = Date
  49. intFreeFile = FileSystem.FreeFile
  50. Open ("security.log") For Append As intFreeFile
  51. Write #intFreeFile, "Connection from " & strName & " (" & strIP & ") on " _
  52.     & strDate & " at " & strTime & "."
  53. FileSystem.Reset
  54. If Winsock1.State <> sckClosed Then
  55.     Winsock1.Close
  56.     Winsock1.Accept requestID
  57. Else
  58.     Exit Sub
  59. End If
  60. End Sub
  61. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
  62. Dim strData As Variant
  63. Dim intFreeFile As Integer
  64. Dim strTime As String
  65. Dim strDate As String
  66. Dim strName As String
  67. Dim strIP As String
  68. strName = Winsock1.RemoteHost
  69. strIP = Winsock1.RemoteHostIP
  70. strTime = Time
  71. strDate = Date
  72. intFreeFile = FileSystem.FreeFile
  73. Winsock1.GetData strData, vbString
  74. Open ("datadump.log") For Append As intFreeFile
  75. Write #intFreeFile, "Received from " & strName & " (" & strIP & ") on " _
  76.     & strDate & " at " & strTime & Chr(13) & "--------------------" & Chr(13) _
  77.     & strData
  78. FileSystem.Reset
  79. End Sub
  80. Private Sub Page()
  81. Dim intFreeFile As Integer
  82. Dim strNumber As String
  83. Dim strIP As String
  84. intFreeFile = FileSystem.FreeFile
  85. Open ("hs.inf") For Input As #intFreeFile
  86. Input #intFreeFile, strNumber
  87. FileSystem.Reset
  88. strIP = Winsock1.RemoteHostIP
  89. While InStr(strIP, ".")
  90.           Mid$(strIP, InStr(strIP, "."), 2) = "*"
  91. Wend
  92. With MSComm1
  93. .PortOpen = True
  94. .Output = "at h0" & vbCr
  95. .Output = "at dt " & strNumber & ",,,,,," & strIP & "#" & vbCr
  96. End With
  97. End Sub
  98.